package com.lyy.extend_study.exercise;


/**
 * @Author:  GZQ
 * @date:  2024/11/14 23:16
 */

public class ExtendsExercise01 {
    public static void main(String[] args) {
        // 将输出 a, b name, b
        B b = new B();
    }
}

class A {

    public A() {
        System.out.println("a");
    }

    public A(String name) {
        System.out.println("a name");
    }
}

class B extends A {
    public B() {
        this("abc");
        System.out.println("b");
    }
    public B(String name) {
        // 默认有 super();
        System.out.println("b name");
    }
}